package com.kcwx.system.dtomap;

import org.mapstruct.*;
import com.kcwx.common.core.domain.entity.SysRole;
import com.kcwx.shareddomain.system.dto.SysRoleEditDto;

/**
 * 角色 mapstruct
 *
 */
@Mapper(componentModel = "spring",unmappedSourcePolicy= ReportingPolicy.IGNORE,nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface SysRoleMap {
    /** addDto to Entity*/
    @Mappings({@Mapping(target = "id", ignore = true),@Mapping(source = "menuIds", target = "menuIds"),@Mapping(source = "deptIds", target = "deptIds")})
    SysRole AddDtoToEntity(SysRoleEditDto addDto);
    /** editDto to Entity*/
    @Mappings({@Mapping(source = "menuIds", target = "menuIds"),@Mapping(source = "deptIds", target = "deptIds")})
    SysRole EditDtoToEntity(SysRoleEditDto editDto);
}
